//
//  DiaryTableViewCell.m
//  e家园设计
//
//  Created by 愉乐 on 15/4/13.
//  Copyright (c) 2015年 lanou3g.com. All rights reserved.
//

#import "DiaryTableViewCell.h"

@implementation DiaryTableViewCell


- (void)dealloc
{
    [self.aimage release];
    [self.user_name release];
    [self.sizeName release];
    [self.style release];
    [self.title release];
    [self.user_pic release];
    [self.styleName release];
    [self.size release];
    [self.backgroundWhiteView release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.backgroundColor = [UIColor colorWithRed:245/255.0f green:245/255.0f blue:245/255.0f alpha:1];
    
        
        
        //交互反馈让其消失
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.aimage = [[UIImageView alloc] initWithFrame:CGRectMake(20, 10, self.contentView.frame.size.width + 10, 180)];
        self.aimage.layer.borderWidth = 0.1;
        self.aimage.layer.cornerRadius = 5;
        self.aimage.layer.masksToBounds = YES;
        self.aimage.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.aimage];
        [self.aimage release];
        
        self.title = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, self.aimage.frame.size.width - 20, 30)];
        self.title.numberOfLines = 0;
        self.title.textColor = [UIColor whiteColor];
        self.title.font = [UIFont  boldSystemFontOfSize:16.0f];
        [self.aimage addSubview:self.title];
        [self.title release];
     
        self.user_pic = [[UIImageView alloc] initWithFrame:CGRectMake(10, self.aimage.frame.size.height - self.user_pic.frame.size.height - 40, 30, 30)];
        self.user_pic.layer.cornerRadius = 15;
        self.user_pic.layer.masksToBounds = YES;
        [self.aimage addSubview:self.user_pic];
        [self.user_pic release];
        

        self.user_name = [[UILabel alloc] initWithFrame:CGRectMake(self.user_pic.frame.origin.x + self.user_pic.frame.size.width + 10 , self.user_pic.frame.origin.y + 10, 100, 15)];
        self.user_name.textColor = [UIColor colorWithRed:224/255.0f green:226/255.0f blue:233/255.0f alpha:1];
        self.user_name.font = [UIFont  boldSystemFontOfSize:12.0f];
        [self.aimage addSubview:self.user_name];
        [self.user_name release];
        
        self.style = [[UILabel alloc] initWithFrame:CGRectMake(self.title.frame.origin.x, self.title.frame.size.height + self.title.frame.origin.y + 10, 36, 12)];
        self.style.font = [UIFont  boldSystemFontOfSize:13.0f];
        self.style.text = @"风格:";
        self.style.textColor = [UIColor colorWithRed:224/255.0f green:226/255.0f blue:233/255.0f alpha:1];
        [self.aimage addSubview:self.style];
        [self.style release];
        
        self.styleName = [[UILabel alloc] initWithFrame:CGRectMake(self.style.frame.origin.x + self.style.frame.size.width,  self.title.frame.size.height + self.title.frame.origin.y + 10, 48, 12)];
        self.styleName.font = [UIFont  boldSystemFontOfSize:12.0f];
        self.styleName.textColor = [UIColor colorWithRed:224/255.0f green:226/255.0f blue:233/255.0f alpha:1];        [self.aimage addSubview:self.styleName];
        [self.styleName release];
        
        
        self.size = [[UILabel alloc] initWithFrame:CGRectMake(self.styleName.frame.origin.x + self.styleName.frame.size.width + 5,  self.title.frame.size.height + self.title.frame.origin.y + 10, 36, 12)];
        self.size.font = [UIFont  boldSystemFontOfSize:12.0f];
        self.size.text = @"户型:";
        self.size.textColor = [UIColor colorWithRed:224/255.0f green:226/255.0f blue:233/255.0f alpha:1];
        [self.aimage addSubview:self.size];
        [self.size release];
        
        
        self.sizeName = [[UILabel alloc] initWithFrame:CGRectMake(self.size.frame.origin.x + self.size.frame.size.width,  self.title.frame.size.height + self.title.frame.origin.y + 10, 48, 12)];
        self.sizeName.font = [UIFont  boldSystemFontOfSize:12.0f];
        self.sizeName.textColor = [UIColor colorWithRed:224/255.0f green:226/255.0f blue:233/255.0f alpha:1];
        [self.aimage addSubview:self.sizeName];
        [self.sizeName release];


        
        
        
    }
    
    return self;
}

@end
